package com.ranshiyan.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import com.ranshiyan.entity.Applicant;
import com.ranshiyan.entity.Job;
import com.ranshiyan.entity.Score;

public interface JobMapper {
	List<Applicant> list(int flag);

	//添加应聘者
	@Insert("INSERT INTO cctv_applicant(`NAME`,gender,birthday,college,major,edu,degree,created) values(#{name},#{gender},#{birthday},#{college},#{major},#{edu},#{degree},now())")
	void add(Applicant applicant);
	
	@Select("SELECT * FROM cctv_applicant where id=#{value}")
	Applicant getApplicant(int aid);

	@Select("SELECT * FROM cctv_job")
	List<Job> listJobs();

	@Insert("Replace INTO cctv_score(aid,jid,score) values(#{aid},#{jid},#{score})")
	void addScore(Score score);
}
